<?php

$skin="portlet_".$system_PortletName."_Skin";
if (isset($$skin)) {
	
	
	$sSql="Select footer From portal_skins Where portalId = ".$portalId." And name = '".$$skin."'";
	
	//echo $sSql."<br/>";
	
	
	
	$rs=$GLOBALS["conn"]->Execute($sSql);
	
	echo $rs->fields["footer"];

}
?>
</div>
<?php


if (isset($$skin) && $$skin!="") {
//echo $$skin;

?>
<script type="text/javascript">
var skindiv=$("#Portlet_<?php echo $system_PortletInstanceId; ?> div:first-child").next();


//alert(skindiv.attr('class')+" Portlet_<?php echo $system_PortletInstanceId; ?> "+skindiv.text().length+" "+skindiv.hasClass('skincontent'));
//skindiv.hasClass('skincontent') && 
 //if (skindiv.text().length==0)    $("#Portlet_<?php echo $system_PortletInstanceId; ?>").empty();


</script>
<?php

}

?>